package com.example.spring_demo.homework;

public class autowriting_demo {
        Boy b;
        Boy2 b2;
        public autowriting_demo(){
            System.out.println("autowiring_demo is created");
        }
        public void setB(Boy b) {
            this.b = b;
        }
    public void setB2(Boy2 b2) {
        this.b2 = b2;
    }
        public void print(){
            System.out.println("hello a");
        }
         public void display(){
            b.print();
            b2.print();
        }
    }

